<template>
  <div id="p">
    <div style="margin-top: 20px;">
      <p class="rightTag" style="top: 3cm;">白联仓库 红联财务 黄联客户</p>
      <span class="printHead">
        <!-- {{company}}{{jxQuarter}}{{isVendor}}{{isInput}}货单 -->
      店铺退货单
      </span>
      <div class="info" style="height: 25px;">
        <p style="margin: 5px 0;">店铺：{{dp}}</p>
        <p style="margin: 5px 0;">退货序号：{{outSequence}}</p>
      </div>
      <canvas id="canvas" class="canvasBox"></canvas>
    </div>
    
    <table 
      border="1"
      align="center"
      id="printTable">
      <thead>
        <tr>
          <td style="width: 4%;padding: 0;" rowspan="2">序号</td>
          <td style="width: 14%;padding: 0;" rowspan="2">型色</td>
          <td style="width: 7%;padding: 0;" rowspan="2">颜色</td>
          <td style="width: 12%;padding: 0;" rowspan="2">品名</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">05</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">07</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">09</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">11</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">13</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">15</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">17</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">19</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">21</td>
          <td style="width: 3.8%;padding: 0;" nowrap="nowrap">23</td>
          <td style="width: 3.8%;padding: 0;">F</td>
          <td rowspan="2" style="width: 7%;">数量</td>
          <td rowspan="2" style="width: 7%;">{{isVendor == '厂商' ? '售' : '单'}}价</td>
          <td rowspan="2">金额</td>
        </tr>
        <tr>
          <td style="border-top: 1px dotted;border-left: 1px dotted;">XS</td>
          <td style="border-top: 1px dotted;">S</td>
          <td style="border-top: 1px dotted;">M</td>
          <td style="border-top: 1px dotted;">L</td>
          <td style="border-top: 1px dotted;">XL</td>
          <td style="border-top: 1px dotted;">2L</td>
          <td style="border-top: 1px dotted;">3L</td>
          <td style="border-top: 1px dotted;">4L</td>
          <td style="border-top: 1px dotted;">5L</td>
          <td style="border-top: 1px dotted;">6L</td>
          <td style="border-top: 1px dotted;"></td>
        </tr>
      </thead>
    </table>
    
    <div class="info">
      <p style="margin: 5px 0;">款号合计：{{printStyle}}</p>
      <p style="margin: 5px 0;">售价合计：{{totalMoney}}</p>
      <p style="margin: 5px 0;">数量合计：{{totalNumber}}</p>
      <!-- <p style="margin: 5px 0;">{{isVendor == '厂商' ? '' : '金额合计：'+printMoney}}</p> -->
    </div>
    <div class="info">
      <p style="margin: 5px 0;">操作员：{{operator}}</p>
      <p style="margin: 5px 0;">财务：</p>
      <p style="margin: 5px 0;">复核：</p>
      <p style="margin: 5px 28.7vw 5px 0;">备注：</p>
    </div>

    <div id="printA" style="page-break-before:always;" v-show="isVendor == '客户' && printType != 2 && isInput != '销' && isInput != '订'">
      <div class="addressH1">
        <p>收货地址：{{address}}</p>
      </div>
      <div class="addressH1">
        <p>收货人：{{manufacturerName}}</p>
      </div>
      <div class="addressH1">
        <p>电话：{{cellphone}}</p>
      </div>
      <div class="addressH1">
        <p>手机：{{phone}}</p>
      </div>
      <div class="addressH2">
        <p>寄件人：{{companyName}}</p>
        <p>联系电话：{{companyPhone}}</p>
      </div>
      <div class="addressH2">
        <p>备注：{{remark}}</p>
      </div>
      <div class="addressH2">
        <p>单据类型：{{shipType}}</p>
        <p>单据序号：{{inputSequence}}</p>
        <p>{{printStyle}}</p>
      </div>
      <div class="addressH2">
        <p>制单人：{{operator}}</p>
        <p>{{inputDate}}</p>
      </div>
    </div>
  </div>
</template>

<script>
import { getSystemConfig } from '../network/operatoryCommand'
export default {
  props: ['dp','outSequence','isInput','isVendor','manufacturerNo','inputSequence','manufacturerName','principal','phone','address','inputDate','jxQuarter','printStyle','totalMoney','totalNumber','printMoney','remark','isAddress','printType','shipType','cellphone','companyName','companyPhone'],
  data(){
    return{
      consignee: '',
      operator: document.cookie.match(RegExp('jxUser'+'=([^;]+)'))[1],
      company: ''
    }
  },
  created(){
    getSystemConfig().then(res => {
      // console.log(res)
      if (res.data.data) {
        this.company = res.data.data.companyName
      }
    })
  }
}
</script>